import pymongo
from pandas import DataFrame
from pykafka import KafkaClient

def run(source: DataFrame, param_dict: dict):
    servers = param_dict["servers"]
    topic_name = param_dict["topic"]
    username = param_dict["username"]
    password = param_dict["password"]
    db_name = param_dict["db"]
    collection_name = param_dict["collection"]

    client = KafkaClient(hosts=servers)
    topic = client.topics[topic_name]
    with topic.get_sync_producer() as producer:
        for i in range(10000):
            producer.produce(('test message ' + str(i)).encode())
